package com.ctgu.controller;


import com.ctgu.entity.Manage;
import com.ctgu.service.IManageService;
import com.ctgu.service.IUsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author fessy
 * @since 2024-12-26
 */
@RestController
@RequestMapping("/manage")
public class ManageController {

    @Autowired
    private IManageService manageService;

    // 查询所有
    @RequestMapping("/getall")
    public List<Manage> getall() {
        List<Manage> list = manageService.list();
        return list;
    }

    //更新
    @RequestMapping("/update")
    public boolean update(@RequestBody Manage manage) {
        boolean b = manageService.updateById(manage);
        return b;
    }

}
